from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import *
from . import viewssup

# Create a router and register our viewsets with it.
router = DefaultRouter()
router.register(r'categories', CategoryViewSet)
router.register(r'subcategories', SubCategoryViewSet)
router.register(r'colors', ColorViewSet)
router.register(r'storage-locations', StorageLocationViewSet)
router.register(r'brands', BrandViewSet)
router.register(r'sizes', SizeViewSet)
router.register(r'materials', MaterialViewSet)
router.register(r'tag-types', TagTypeViewSet)
router.register(r'tags', TagViewSet)
router.register(r'images', ImageViewSet)
router.register(r'clothes', ClothesViewSet)
router.register(r'clothes-materials', ClothesMaterialViewSet)
router.register(r'suits', SuitsViewSet)
router.register(r'location-info', LocationInfoViewSet)
router.register(r'weather-conditions', WeatherConditionViewSet)
router.register(r'feelings', FeelingViewSet)
router.register(r'records', RecordViewSet)
router.register(r'season', SeasonViewSet)
router.register(r'thickness', ThicknessViewSet)
router.register(r'sizetype', SizeTypeViewSet)

# The API URLs are now determined automatically by the router.
urlpatterns = [
    path('comm/', include(router.urls)),

    path('get_categories_info/', viewssup.GetCategoriesInfo),
    path('get_categories_list/', viewssup.GetCategoriesList),
    path('get_clothes_by_subcat/', viewssup.GetClothesBySubCategory),
    path('get_clothes_by_cat/', viewssup.GetClothesByCategory),
    path('get_tag_list/', viewssup.GetTagList),
    path('get_size_list/', viewssup.GetSizeList),

    path('get_day_record/', viewssup.GetDayRecord),
    path('get_month_record/', viewssup.GetRecordByMonth),
]
